Skip to content

Conversation

qdm12
Copy link
Contributor

@qdm12 qdm12 commented Jan 13, 2025

Why this should be merged

Contribution to the libevm effort.
Note there are the same changes for both coreth and subnet-evm, but they should not be part of libevm since these are extra features specific to subnet-evm/coreth, even if they're the same for both.

How this works

Comparing the following:

Therefore:

  • file kept and refactored metrics/prometheus/prometheus.go with the Gatherer implementation we use
  • file kept and refactored metrics/prometheus/prometheus_test.go
  • new file metrics/prometheus/interfaces.go added for refactoring
  • geth global variable metrics.Enabled is set to true in plugin/evm.VM.initializeMetrics

Note for the two files refactored (with fixes as well), this was done in some intermediary step in ava-labs/libevm#103, so I decided to bring this over here so it doesn't get trashed.

How this was tested

CI passing

Need to be documented?

No

Need to update RELEASES.md?

Not really, since it should not change anything 🙏

@qdm12 qdm12 marked this pull request as ready for review January 13, 2025 16:08
@qdm12 qdm12 requested review from a team, ceyonur and darioush as code owners January 13, 2025 16:08
@qdm12 qdm12 force-pushed the qdm12/libevm/metrics branch from 7c08815 to 15866c8 Compare January 15, 2025 11:15
@qdm12 qdm12 requested a review from darioush January 15, 2025 11:40
darioush
darioush previously approved these changes Jan 23, 2025
@qdm12 qdm12 changed the title chore(metrics): use libevm metrics package and delete local metrics chore(metrics): use geth metrics package and delete local metrics Jan 27, 2025
@qdm12 qdm12 force-pushed the qdm12/libevm/metrics branch 2 times, most recently from 769d5fc to b008bf7 Compare January 27, 2025 13:33
maru-ava
maru-ava previously approved these changes Jan 27, 2025
Copy link
Contributor

@maru-ava maru-ava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! The subnet dashboard is now populated with metrics for the load test e2e job:

A random PR doesn't show any metrics on the subnets dashboard for the same job:

@qdm12
Copy link
Contributor Author

qdm12 commented Jan 28, 2025

A random PR doesn't show any metrics on the subnets dashboard for the same job:

Ah, let me check if I can revert it to no-metric, and open another PR (based off this one I suppose) to enable metrics.
Since this PR is not meant to change anything and should be pure maintenance / code movement.

@qdm12 qdm12 dismissed stale reviews from maru-ava and darioush via a4eaf83 February 7, 2025 14:34
@qdm12
Copy link
Contributor Author

qdm12 commented Feb 10, 2025

Working as expected, this is good to go (same as ava-labs/coreth#745), just need reviews 😉

@qdm12 qdm12 enabled auto-merge (squash) February 10, 2025 07:50
@qdm12 qdm12 requested review from darioush and maru-ava February 10, 2025 07:50
maru-ava
maru-ava previously approved these changes Feb 10, 2025
darioush
darioush previously approved these changes Feb 11, 2025
Copy link

@darioush darioush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some optional suggestions

qdm12 and others added 24 commits March 21, 2025 10:56
- add exported comments
- rename `g` to `gatherer` in test
- Format copyright as it should be ™️
- Remove TODO
- remove non linkable prometheus.Registry
Co-authored-by: Arran Schlosberg <[email protected]>
Signed-off-by: Quentin McGaw <[email protected]>
@qdm12 qdm12 force-pushed the qdm12/libevm/metrics branch from 92a9a1e to 2ce6cfa Compare March 21, 2025 10:14
@qdm12 qdm12 changed the base branch from master to qdm12/libevm/master-merge-1 March 21, 2025 10:14
@qdm12 qdm12 merged commit 216c6a4 into qdm12/libevm/master-merge-1 Mar 21, 2025
3 of 13 checks passed
@qdm12 qdm12 deleted the qdm12/libevm/metrics branch March 21, 2025 10:17
@qdm12
Copy link
Contributor Author

qdm12 commented Mar 21, 2025

Force push rebasing the branch on qdm12/libevm/master-merge-1 (libevm up to date with master), history is kept more or less, but everything will have to be re-reviewed.


this PR got merged and I have no idea how. I may have pressed keyboard shortcuts merging it, but I really have no idea, I re-opened another draft PR #1508 + hard reset my branch qdm12/libevm/master-merge-1 to discard that out-of-nowhere-merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE This PR is not meant to be merged in its current state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants